import random
import string

def generator(prefix=None):

    ranstr = ''.join(random.sample(string.ascii_lowercase,5))
    if prefix is not None:
        return prefix + '-' + ranstr
    else:
        return ranstr

